package org.flown.shop;

import java.io.File;

public enum DirectoryInformation
{
    GOODS("goods");

    private final String name;

    DirectoryInformation(String name) {this.name = name;}
    public String getName(){return this.name;}
    public String getRealPath() {return System.getProperty("user.dir") + "/" + this.name;}

    public static boolean createDirectory()
    {
        for (DirectoryInformation info : DirectoryInformation.values())
        {
            File directory = new File(info.getRealPath());
            if (!directory.mkdir())
                return false;
        }
        return true;
    }
}

